import * as echarts from '../../../components/ec-canvas/echarts'

module.exports = {
  line1: {
    xAxis: {
      type: 'category',
      boundaryGap: false,
      data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
    },
    yAxis: {
      type: 'value',
      axisLabel: {
        formatter: '{value}:00'
      },
      min:4,
      max:24
    },
    grid: {
      left: 45,
      top: 30,
      bottom: 30,
      right: 15,
    },
    color: ['#498f6a', '#df6a42'],
    legend: {
      data: ['执行工作完成时间', '检查工作完成时间'],
      x:'40px'
    },
    series: [
      {
        name: '执行工作完成时间',
        data: [8, 8, 8, 8, 8, 8, 8],
        type: 'line',
        smooth: true,
        symbol: 'circle',
        itemStyle:{
          normal:{
            color:'#498f6a'
          }
        },
        areaStyle:{
          normal:{
            color:new echarts.graphic.LinearGradient(0,0,0,1,[{
              offset:0,
              color:'#498f6a'
            },{
              offset:1,
              color:'#ffe'
            }])
          }
        }
      },
      {
        name: '检查工作完成时间',
        data: [8, 8, 8, 8, 8, 8, 8],
        type: 'line',
        smooth: true,
        symbol: 'circle',
        itemStyle: {
          normal: {
            color: '#df6a42'
          }
        },
        areaStyle: {
          normal: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
              offset: 0,
              color: '#df6a42'
            }, {
              offset: 1,
              color: '#ffe'
            }])
          }
        },
      },
    ],
  },
  line2: {
    xAxis: {
      type: 'category',
      boundaryGap: false,
      data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
    },
    yAxis: {
      type: 'value',
      axisLabel: {
        formatter: '{value}:00'
      },
      min: 4,
      max: 24
    },
    grid: {
      left: 45,
      top: 30,
      bottom: 30,
      right: 15,
    },
    color: ['#498f6a', '#df6a42'],
    legend: {
      data: ['执行工作完成时间', '检查工作完成时间'],
      x: '40px'
    },
    series: [
      {
        name: '执行工作完成时间',
        data: [8, 8, 10, 8, 20, 8, 8],
        type: 'line',
        smooth: true,
        symbol: 'circle',
        itemStyle: {
          normal: {
            color: '#498f6a'
          }
        },
        areaStyle: {
          normal: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
              offset: 0,
              color: '#498f6a'
            }, {
              offset: 1,
              color: '#ffe'
            }])
          }
        }
      },
      {
        name: '检查工作完成时间',
        data: [9, 10, 13, 8, 9, 22, 21],
        type: 'line',
        smooth: true,
        symbol: 'circle',
        itemStyle: {
          normal: {
            color: '#df6a42'
          }
        },
        areaStyle: {
          normal: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
              offset: 0,
              color: '#df6a42'
            }, {
              offset: 1,
              color: '#ffe'
            }])
          }
        },
      },
    ],
  },
  circle1: {
    title: {
      text: '100%',
      subtext: '通过率',
      left: '50%',
      top: '40%',
      itemGap: 5,
      padding: 0,
      textAlign: 'center',
      textVerticalAlign: 'top',
      textStyle: {
        fontWeight: 'bold',
        color: '#4e5458',
        fontSize: 30,
        lineHeight: 30,
        verticalAlign: 'top',
      },
      subtextStyle: {
        fontSize: 14,
        color: '#99a2ad',
        verticalAlign: 'top',
      },
    },
    color: ['#f3bb62'],
    series: [    //配置
      {
        type: 'pie',
        radius: ['55%', '70%'],
        startAngle:20,
        hoverAnimation:false,
        label: {
          formatter: `{b}{d}%`
        },
        data: [
          {
            value: 100, 
            name: '完成',
            itemStyle: {
              normal: {
                color: {
                  x: 1,
                  y: 1,
                  x2: 0,
                  y2: 0,
                  colorStops: [
                    { offset: 0, color: '#199782' },
                    { offset: 1, color: '#51d38e' },
                  ],
                },
              },
            },
          },
          {value: 0, name: '未完成'},
        ]
      },
    ],
  },
  circle2: {
    title: {
      text: '100%',
      subtext: '通过率',
      left: '50%',
      top: '40%',
      itemGap: 5,
      padding: 0,
      textAlign: 'center',
      textVerticalAlign: 'top',
      textStyle: {
        fontWeight: 'bold',
        color: '#4e5458',
        fontSize: 30,
        lineHeight: 30,
        verticalAlign: 'top',
      },
      subtextStyle: {
        fontSize: 14,
        color: '#99a2ad',
        verticalAlign: 'top',
      },
    },
    color: ['#f3bb62'],
    series: [    //配置
      {
        type: 'pie',
        radius: ['55%', '70%'],
        startAngle: 20,
        hoverAnimation: false,
        label: {
          formatter: `{b}{d}%`
        },
        data: [
          {
            value: 100,
            name: '完成',
            itemStyle: {
              normal: {
                color: {
                  x: 1,
                  y: 1,
                  x2: 0,
                  y2: 0,
                  colorStops: [
                    { offset: 0, color: '#199782' },
                    { offset: 1, color: '#51d38e' },
                  ],
                },
              },
            },
          },
          { value: 0, name: '未完成' },
        ]
      },
    ],
  },
  circle3: {
    title: {
      text: '100%',
      subtext: '通过率',
      left: '50%',
      top: '40%',
      itemGap: 5,
      padding: 0,
      textAlign: 'center',
      textVerticalAlign: 'top',
      textStyle: {
        fontWeight: 'bold',
        color: '#4e5458',
        fontSize: 30,
        lineHeight: 30,
        verticalAlign: 'top',
      },
      subtextStyle: {
        fontSize: 14,
        color: '#99a2ad',
        verticalAlign: 'top',
      },
    },
    color: ['#f3bb62'],
    series: [    //配置
      {
        type: 'pie',
        radius: ['55%', '70%'],
        startAngle: 20,
        hoverAnimation: false,
        label: {
          formatter: `{b}{d}%`
        },
        data: [
          {
            value: 100,
            name: '完成',
            itemStyle: {
              normal: {
                color: {
                  x: 1,
                  y: 1,
                  x2: 0,
                  y2: 0,
                  colorStops: [
                    { offset: 0, color: '#199782' },
                    { offset: 1, color: '#51d38e' },
                  ],
                },
              },
            },
          },
          { value: 0, name: '未完成' },
        ]
      },
    ],
  },
  circle4: {
    title: {
      text: '100%',
      subtext: '通过率',
      left: '50%',
      top: '40%',
      itemGap: 5,
      padding: 0,
      textAlign: 'center',
      textVerticalAlign: 'top',
      textStyle: {
        fontWeight: 'bold',
        color: '#4e5458',
        fontSize: 30,
        lineHeight: 30,
        verticalAlign: 'top',
      },
      subtextStyle: {
        fontSize: 14,
        color: '#99a2ad',
        verticalAlign: 'top',
      },
    },
    color: ['#f3bb62'],
    series: [    //配置
      {
        type: 'pie',
        radius: ['55%', '70%'],
        startAngle: 20,
        hoverAnimation: false,
        label: {
          formatter: `{b}{d}%`
        },
        data: [
          {
            value: 100,
            name: '完成',
            itemStyle: {
              normal: {
                color: {
                  x: 1,
                  y: 1,
                  x2: 0,
                  y2: 0,
                  colorStops: [
                    { offset: 0, color: '#199782' },
                    { offset: 1, color: '#51d38e' },
                  ],
                },
              },
            },
          },
          { value: 0, name: '未完成' },
        ]
      },
    ],
  },
}